﻿using BootstrapBlazor.Components;
using CodeMan.Application.Contracts;
using CodeMan.Application.Contracts.ClassGens;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using Microsoft.JSInterop;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace CodeManDesktopBlazor.BlazorComponents.Pages
{
    /// <summary>
    /// 
    /// </summary>
    public partial class TableDemo : ComponentBase
    {
        [Inject]
        private IStringLocalizer<FooDemo> Localizer { get; set; }
        /// <summary>
        ///
        /// </summary>
        [Inject]
        private IJSRuntime JSRuntime { get; set; }

        private IEnumerable<SelectedItem> Hobbys { get; set; }
         
        private int tableHeight { get; set; }

        /// <summary>
        /// 
        /// </summary>
        protected override async Task OnInitializedAsync()
        {
            tableHeight = GData.tableHeight;
            await base.OnInitializedAsync();

            Hobbys = FooDemo.GenerateHobbys(Localizer);

        }
       
        /// <summary>
        /// 
        /// </summary>
        private static IEnumerable<int> PageItemsSource => new int[] { 4, 10, 20 };
    }
}
